-
Notifications
You must be signed in to change notification settings - Fork 898
Add vendor_id
and finish_reason
to Gemini/Google model responses
#1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@davide-andreoli Thanks! Can you please have a look at the failing tests, and also implement this in the new |
@DouweM The test failures are due to the vendor_details field. I see two potential ways to address this:
Please let me know which approach you’d prefer. And sure, no problem with adding the fields to |
@davide-andreoli I had a chat about this with @dmontagu and we decided to make it so that dataclass fields with default values are excluded from reps: #1812. So once that merges (should be soon), you can merge/rebase, drop |
28dec6a
to
273e783
Compare
Hello @DouweM, work is done and tests are passing. |
id
and finish_reason
to Geminivendor_id
and finish_reason
to Gemini/Google model responses
@davide-andreoli Thanks Davide! |
Add
id
andfinish_reason
to GeminiDescription
Following PR#1761 , this update adds
vendor_id
andfinish_reason
to Gemini answers.Below the details:
vendor_id
: maps toresponseId
finish_reason
:finishReason
for the first candidate of the output. The finish reason is added in vendor_details, following the attribute specificationThe handling of finish_reasons aligns with the current approach for other response parts, where only the first candidate's reason is considered.
Testing
The changes were validated using my API key, and the behavior matches expectations.
Impact
This update impacts only Gemini Responses, but it is not a breaking change.